The fopen() function opens the file specified by filename and associates a stream with it. The mode variable is a character string specifying the type of ...
To open files in text mode, attach the letter 't' to the permission argument, such as 'rt' or 'wt+' . On Windows® systems, in text mode: Read operations that ...
The 'rt' permission argument opens the file for reading in text mode. On Windows machines, the carriage return character -r is removed when reading text in.